package model.Entity.SIS;

import java.io.Serializable;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * The persistent class for the SIS_SEMESTERS database table.
 * 
 */
@Entity
@Table(name="SIS_SEMESTERS")
@NamedQueries({ 
	@NamedQuery(name="Semester.findAll", query="SELECT s FROM Semester s"),
	@NamedQuery(name="Semester.findActiveSemester", query="SELECT s FROM Semester s WHERE s.isActivated = 1" )
})

public class Semester implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
    @Basic(optional = false)
    @NotNull
	private Integer semester;

    @Basic(optional = false)
    @NotNull
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="ENTRY_DATE")
	private Date entryDate;

    @Basic(optional = false)
    @NotNull
    @Column(name="ENTRY_USER")
	private Integer entryUser;

    @Basic(optional = false)
    @NotNull
    @Column(name="IS_ACTIVATED")
	private Integer isActivated;

    @Basic(optional = false)
    @NotNull
    @Column(name="IS_CLOSED")
	private Integer isClosed;

    @Basic(optional = false)
    @NotNull
    @Column(name="IS_PREPARED")
	private Integer isPrepared;

    @Basic(optional = false)
    @NotNull
    @Column(name="IS_WEB_REGISTRATION")
	private Integer isWebRegistration;

	public Semester() {
	}

	public Integer getSemester() {
		return this.semester;
	}

	public void setSemester(Integer semester) {
		this.semester = semester;
	}

	public Date getEntryDate() {
		return this.entryDate;
	}

	public void setEntryDate(Date entryDate) {
		this.entryDate = entryDate;
	}

	public Integer getEntryUser() {
		return this.entryUser;
	}

	public void setEntryUser(Integer entryUser) {
		this.entryUser = entryUser;
	}

	public Integer getIsActivated() {
		return this.isActivated;
	}

	public void setIsActivated(Integer isActivated) {
		this.isActivated = isActivated;
	}

	public Integer getIsClosed() {
		return this.isClosed;
	}

	public void setIsClosed(Integer isClosed) {
		this.isClosed = isClosed;
	}

	public Integer getIsPrepared() {
		return this.isPrepared;
	}

	public void setIsPrepared(Integer isPrepared) {
		this.isPrepared = isPrepared;
	}

	public Integer getIsWebRegistration() {
		return this.isWebRegistration;
	}

	public void setIsWebRegistration(Integer isWebRegistration) {
		this.isWebRegistration = isWebRegistration;
	}

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (semester != null ? semester.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Semester)) {
            return false;
        }
        Semester other = (Semester) object;
        if ((this.semester == null && other.semester != null) || (this.semester != null && !this.semester.equals(other.semester))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Semester[ semester=" + semester + " ]";
    }

}